import Vue from 'vue'
import VueRouter from 'vue-router'
import Main from '../views/Main.vue'
import Hot from '../views/Hot.vue'
import Home from '../views/Home.vue'
import Search from '../views/Search.vue'
import Detail from '../views/Detail.vue'
import pinglun from '../views/pinglun.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Main',
    component: () => import('../views/Main.vue'),
    children: [
      {
        path: 'Home',
        alias: '',
        name: 'Home',
        component: () => import('../views/Home.vue'),
      },
      {
        path: 'Hot',
        name: 'Hot',
        component: () => import('../views/Hot.vue'),
      },
      {
        path: 'Search',
        name: 'Search',
        component: () => import('../views/Search.vue'),
      },
    ]



  },
  {
    path: '/Detail',
    name: 'Detail',
    component: () => import('../views/Detail.vue'),
  },
  {
    path: '/pinglun',
    name: 'pinglun',
    component: () => import('../views/pinglun.vue'),
  },

]

const router = new VueRouter({
  routes
})

export default router
